diff options
| author | Dominik Koch <dominik@koch-bautechnik.de> | 2025-07-21 23:45:02 +0200 |
|---|---|---|
| committer | Dominik Koch <dominik@koch-bautechnik.de> | 2025-07-21 23:45:02 +0200 |
| commit | 5ef6e2bc97d5b0def83f4ee78a515d2b216a6ed3 (patch) | |
| tree | 9479a6528703e4a644552e594bedc97b7ed036a6 /apps/web/src/app/blog/[slug] | |
| parent | 7ea4b316265bf0d4387f9dd0f76550a685bcb959 (diff) | |
| download | opencut-5ef6e2bc97d5b0def83f4ee78a515d2b216a6ed3.tar.gz | |
fix: implement coderabbit suggestions
They actually good wtf
Diffstat (limited to 'apps/web/src/app/blog/[slug]')
| -rw-r--r-- | apps/web/src/app/blog/[slug]/page.tsx | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/apps/web/src/app/blog/[slug]/page.tsx b/apps/web/src/app/blog/[slug]/page.tsx index 584d8e24..0de1e0a8 100644 --- a/apps/web/src/app/blog/[slug]/page.tsx +++ b/apps/web/src/app/blog/[slug]/page.tsx @@ -1,11 +1,7 @@ import { Header } from "@/components/header"; import Prose from "@/components/ui/prose"; import { Separator } from "@/components/ui/separator"; -import { - getPosts, - getSinglePost, - processHtmlContent, -} from "@/lib/blog-query"; +import { getPosts, getSinglePost, processHtmlContent } from "@/lib/blog-query"; import { Metadata } from "next"; import Image from "next/image"; import { notFound } from "next/navigation"; @@ -118,17 +114,21 @@ async function Page({ params }: PageProps) { {data.post.title} </h1> <div className="flex items-center justify-center gap-2"> - <Image - src={data.post.authors[0].image} - alt={data.post.authors[0].name} - width={36} - height={36} - loading="eager" - className="aspect-square shrink-0 size-8 rounded-full" - /> - <p className="text-muted-foreground"> - {data.post.authors[0].name} - </p> + {data.post.authors[0] && ( + <> + <Image + src={data.post.authors[0].image} + alt={data.post.authors[0].name} + width={36} + height={36} + loading="eager" + className="aspect-square shrink-0 size-8 rounded-full" + /> + <p className="text-muted-foreground"> + {data.post.authors[0].name} + </p> + </> + )} </div> </div> <Separator /> |
